/* jshint indent: 1 */

module.exports = function (sequelize, DataTypes) {
	return sequelize.define('sys_post', {
		id: {
			type: DataTypes.STRING(36),
			allowNull: false,
			primaryKey: true
		},
		post_name: {
			type: DataTypes.STRING(100),
			allowNull: false
		},
		post_type: {
			type: DataTypes.INTEGER(1),
			allowNull: true
		},
		post_sort: {
			type: DataTypes.INTEGER(10),
			allowNull: true
		},
		post_code: {
			type: DataTypes.STRING(20),
			allowNull: true
		},
		status: {
			type: DataTypes.INTEGER(1),
			allowNull: false,
			defaultValue: '0'
		},
		create_by: {
			type: DataTypes.STRING(36),
			allowNull: false
		},
		create_date: {
			type: DataTypes.DATE,
			allowNull: false
		},
		update_by: {
			type: DataTypes.STRING(36),
			allowNull: false
		},
		update_date: {
			type: DataTypes.DATE,
			allowNull: false
		},
		remarks: {
			type: DataTypes.STRING(500),
			allowNull: true
		}
	}, {
		tableName: 'sys_post',
		timestamps: false,
		freezeTableName: true
	});
};